<?php $SS = new Zend_Session_Namespace ('Language');

$lang = $SS->language;

$langImage = "Hình ảnh";
if($lang == "en"){
$langImage = "Image";  
}elseif($lang == "chi"){
$langImage = "圖像";
}

$langName = "Tên sản phẩm";
if($lang == "en"){
$langName = "Product name";  
}elseif($lang == "chi"){
$langName = "產品名稱";
}

$langPrice = "Giá";
if($lang == "en"){
$langPrice = "Price";  
}elseif($lang == "chi"){
$langPrice = "價格";
}

$langWeight = "Trọng lượng";
if($lang == "en"){
$langWeight = "Weight";  
}elseif($lang == "chi"){
$langWeight = "重量";
}
$langTotal = "Tổng tiền";
if($lang == "en"){
$langTotal = "Total";  
}elseif($lang == "chi"){
$langTotal = "總";
}

$langTotalInvoice = "Tổng hóa đơn";
if($lang == "en"){
$langTotalInvoice = "Total Invoice";  
}elseif($lang == "chi"){
$langTotalInvoice = "總發票";
}
?>
<div class="row">
                <?php if(count($this->data) > 0) { ?>
                    
                
                <table class="span9 table-striped table" id="list">
                    <tr>
                        <th>STT</th>
                        <th><?php echo $langImage;?></th>
                        <th><?php echo $langName;?></th>
                        <th><?php echo $langPrice;?></th>
                        <th><?php echo $langWeight;?></th>
                        <th><?php echo $langTotal;?></th>
                        <th></th>
                    </tr>
                    <?php $i =1; foreach($this->data as $key=>$value):
                    @$total = $total + $value['total'];
                     ?>
                    <tr>
                        <td align="center"><?php echo $i; ?></td>
                        <td align="center"><img src="<?php echo $this->baseUrl()."/upload/".$value['image'];?>" width="80" height="66"/></td>
                        <td><strong><?php echo $lang == "en" ? $value['name_en'] :  $value['name'];?></strong></td>
                        <td><span style="color: red;"><?php echo number_format($value['price']);?> VNĐ </span></td>
                        <td style="text-align: center;"><input style="width: 60px;" onchange="change(<?php echo $value['id']; ?>)" id="number<?php echo $value['id']; ?>" type="text" size="4" value="<?php echo $value['number'];?>"/>Kg</td>
                        <td><span style="color: green;"><?php echo number_format($value['total']);?> VNĐ </span></td>
                        <td><a onclick="deleteCart(<?php echo $value['id'];?>)"><?php echo $lang == "vi" ? "Xóa" : "Delete";?></a></td>
                    </tr>
                    <?php $i++; endforeach; ?>
                    <tr>
                        <td colspan="5" style="text-align: right;"><strong><?php echo $langTotalInvoice;?></strong></td>
                        <td colspan="2"><span style="color: red; font-weight: bold;"><?php echo @number_format($total); ?> VNĐ</td>
                    </tr>
                </table>
                
                <div class="row" style="margin-left: 30px;">
                    <div class="span3"><a href="/" title="tiếp tục mua sản phẩm"><img src="<?php echo $this->baseUrl();?>/images/muatiep.png"/></a></div>
                    <div class="span3"><a href="/orders/index/finish/1" title="thanh toán đơn hàng"><img src="<?php echo $this->baseUrl();?>/images/guidonhang.png"/></a></div>
                </div>
            
                
                <?php } else{ echo "Không có sản phẩm nào trong giỏ hàng của bạn";}?>
            </div>